<li id="note_<%=@note.id%>" class="edit_note_item">
  <%remote_form_for @note, :method => "put" do |note_form| %>
    <%= text_area :note, :text, :class => "edit_note_input", :rows => 2%>
    <div class="edit_control_elements">  
      <%if !@note.todo.nil?%>
      <% fields_for @note.todo do |todo_fields| %>
          <%=todo_fields.check_box :done%>
          <%=link_to_remote 'chancel_todo',  { :url => {:controller => :todos, :action => :destroy, :id => @note.id}, :method => 'delete'}, :href => url_for(:controller => :todos, :action => :destroy, :id => @note.id)%>
        <%end%>
      <%end%>
      
      <%= note_form.hidden_field :updated_at%>
      <%= submit_tag "сохранить", :class => "edit_note_submit_button" %>
      <%=link_to_remote "отменить",  { :url => note_url(@note), :method => "get" }, :href => url_for(note_url(@note)), :method => "get"%>
    </div>
  <%end%>
</li>